import request from '@/utils/request'

// 人口查询
export function peopDetail(data) {
  return request({
    url: '/population/detail/' + data,
    method: 'get',
  })
}
// 人口数据-分布查询
export function peopleDistribution(data) {
  return request({
    url: '/population/people_distribution',
    method: 'get',
    params: data,
  })
}
// 人口数据-列表查询
export function peopList(data) {
  return request({
    url: '/population/list',
    method: 'get',
    params: data,
  })
}
// 人口数据-删除
export function peopRemove(data) {
  return request({
    url: '/population/remove/' + data,
    method: 'post',
  })
}
// 人口数据-新增或修改
export function peopSaveUpdate(data) {
  return request({
    url: '/population/save_update',
    method: 'post',
    data,
  })
}

// 查询全部企业坐标
export function coordinatesList(data) {
  return request({
    url: '/enterprise/coordinatesList',
    method: 'get',
    params: data,
  })
}
// 根据id查询企业
export function getById(data) {
  return request({
    url: '/enterprise/getById',
    method: 'get',
    params: data,
  })
}
// 查询所有企业
export function enterpriseList(data) {
  return request({
    url: '/enterprise/list',
    method: 'get',
    params: data,
  })
}
// 获取不同年龄段的统计数
export function populationByAge(data) {
  return request({
    url: '/population/count/by-age',
    method: 'get',
    params: data,
  })
}
// 获取各级网格数量
export function gridCount(data) {
  return request({
    url: '/grid/coordinate/count',
    method: 'get',
    params: data,
  })
}
// 查询各种类型的企业数量
export function enterpriseCount(data) {
  return request({
    url: '/enterprise/enterpriseCount',
    method: 'get',
    params: data,
  })
}
// 企业-新增
export function addEnterprise(data) {
  return request({
    url: '/enterprise/addEnterprise',
    method: 'post',
    data,
  })
}
// 企业-修改
export function updateEnterprise(data) {
  return request({
    url: '/enterprise/updateEnterprise',
    method: 'post',
    data,
  })
}
// 获取实况天气
export function getWeather(data) {
  return request({
    url: '/gaode/get/weather',
    method: 'get',
    params: data,
  })
}
// 根据id删除企业
export function deleteEnterprise(data) {
  return request({
    url: '/enterprise/deleteById',
    method: 'get',
    params: data,
  })
}
// 各级数据汇总
export function summaryData(data) {
  return request({
    url: '/grid/coordinate/summary/data',
    method: 'get',
    params: data,
  })
}
// 事件处办数据汇总
export function mattersSummaryData(data) {
  return request({
    url: '/matters/summary/data',
    method: 'get',
    params: data,
  })
}
// 各个月的事件统计图(上报，办结)
export function getMonthMatters(data) {
  return request({
    url: '/matters/get/month/statistics',
    method: 'get',
    params: data,
  })
}
